package com.bonc.rms.controller;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.alibaba.fastjson.JSON;
import com.bonc.rms.service.UserShowPetService;

@RestController
@RequestMapping(value = "/userShowPetController")
public class UserShowPetController {
	@Autowired
	UserShowPetService userShowPetService;
	
	@RequestMapping(value = "/getPetInfo")
	@ResponseBody
	public String getPetInfo(@RequestParam(value = "petNumber") Integer petNumber) {
		
		List<Map<String, Object>> petInfoList = userShowPetService.getPetInfo(petNumber);
		
		return JSON.toJSONString(petInfoList);
	}

}
